<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'bumen_new.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/zby_depanew.css">

<script src="js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>

<body>


 <!-- <h2 style="margin-left: 20px;color:#999;">部门日程</h2> -->
  <p style="margin: 20px 20px;">>>当前位置:部门日程</p>
    <hr style="color:#eee;">
    <div style="background-color: #eee; ">
    <br><%-- <%=request.getContextPath() %>/ --%>
     <div class="find">
      <form action="<%=request.getContextPath() %>/yz/schedulelikeFind" method="post" id="myform"> <!-- target="div1" -->
	         <center>
	             <label>选择部门：</label>
	              <s:textfield value="%{#session.depart.departname}" disabled="true" />
			      <s:hidden value="%{#session.depart.departid}"  name="schecule.departinfo.departid"></s:hidden>		
			    		<span class="span">&nbsp;</span>
			      <label>选择发布人：</label>
	                <s:select list="%{#session.userinfoList}" listKey="userid"  listValue="username" name="schecule.userinfo.userid" value="%{#session.userinfoList.userid}" headerKey="0" headerValue=" " cssStyle="width: 150px;"></s:select>			    
			    		<span class="span">&nbsp;</span>
			      <label>日期:------</label>
			    	<input id="date" name="time" onclick="WdatePicker()"/>
			    		<span calss="span">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
			     <button type="submit" style="text-decoration:none;border:1px solid #000;padding:2px 4px;background-color: #999;">
				   <a href="#" style="text-decoration: none;color:blue;font-size:14px;">&nbsp;&nbsp;&nbsp; 搜&nbsp;&nbsp;&nbsp;索&nbsp;&nbsp;&nbsp;</a>
				  </button>
				  
	         </center>
	    </form>
	 </div>
	<br>
    </div>		   
    <hr />

    <div style="width: 1100px;margin: 0px auto;">
    
		<c:if test="${empty scheList}"> <!-- 没有记录时提示没有记录 -->
		   <span style="color:red;font-size:18px;">没有查找记录!</span>
		</c:if>
		<c:if test="${!empty scheList}">
		    <div>
				    <table id="examTable" style="width: 1100px;margin:0px auto;">
				        <tr id="examTr" style="color: #000;background: #eee;font-weight: bolder;font-size: 20px;padding: 15px 0px;"><!-- <th>内容</th> -->
							<th>部门</th>
							<th>发布者</th> 
							<th>开始时间</th>
							<th>结束时间</th>
							<th>操作</th>
						</tr>
					   <c:forEach items="${pb.list}" var="s">
						<tr>
							<td>${s.departinfo.departname}</td>
							<td>${s.userinfo.username}</td> 
							<td>${s.calendar.start}</td>
							<td>${s.calendar.end}</td>
							<td>
							<a href="<%=request.getContextPath() %>/yz/schedulefindOne?schecule.scheduleid=${s.scheduleid}">查看详细</a>
								&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="<%=request.getContextPath() %>/yz/scheduledelete?schecule.scheduleid=${s.scheduleid}" onclick="return confirm('确认删除么?')" >删除</a>
							</td>
						</tr>
					    </c:forEach>
				    </table>
		     </div>
			     
			    <div id="p" style="width: 1100px;height:30px;font-size: 16px;background-color:#eee;text-align: center;line-height: 30px;margin:0px auto;">
			        <span>当前第${sessionScope.pb.currentPage}页</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				    <span>总共${sessionScope.pb.totalPage}页</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    	<span><a href="<%=basePath%>/yz/schedulepage?page=1">首页</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    	<span><a href="<%=basePath%>/yz/schedulepage?page=${sessionScope.pb.currentPage-1}" >上一页</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    	<span><a href="<%=basePath%>/yz/schedulepage?page=${sessionScope.pb.currentPage+1}" >下一页</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    	<span><a href="<%=basePath%>/yz/schedulepage?page=${sessionScope.pb.totalPage}" >末页</a></span>
			    </div>
		</c:if>
	</div>
</body>
</html>
<%-- <a href="<%=request.getContextPath() %>/yz/scheduledelete?schecule.scheduleid=${s.scheduleid}" onclick="return confirm('确认删除么?')">删除</a>
 --%>					